package cate.common.table.call.sheet;

import cate.common.table.ESheet;
import cate.common.table.call.row.CallBaseRow;

import java.util.HashSet;
import java.util.Set;

public class CallBaseSheet extends ESheet<CallBaseRow> {
    @Override
    public String getSheetName() {
        return "英雄召唤基础";
    }
    @Override
    protected CallBaseRow buildRow() {
        return new CallBaseRow();
    }

    public Set<Byte> getAllModes(){
        Set<Byte> modes = new HashSet<>();
        for(CallBaseRow row : getList()){
            modes.add(row.callMode);
        }
        return modes;
    }

    public Set<Integer> getModeAllType(byte mode) {
        Set<Integer> types = new HashSet<>();
        for(CallBaseRow row : getList()){
            if(row.callMode == mode){
                types.add(row.callType);
            }
        }
        return types;
    }
}
